package com.woniu.market_stall_web.controller;

import com.woniu.market_stall_web.entity.User;
import com.woniu.market_stall_web.service.StallDetailService;
import com.woniu.market_stall_web.vo.StallDetailVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;
import java.util.List;
import java.util.Map;

@Controller
@RequestMapping("detail")
public class StallDetailController {
    @Autowired
    StallDetailService stallDetailService;
    @RequestMapping("/all")
    public String all(Map map, HttpSession httpSession){
        User userInfo= (User) httpSession.getAttribute("userInfo");
        List<StallDetailVo> list = stallDetailService.queryDetail(userInfo.getId());
        map.put("detail",list);
        return "detail";
    }
}
